package com.maya.medicalwastes.adapter;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.maya.medicalwastes.R;
import com.maya.medicalwastes.entity.CollectBean;
import com.maya.medicalwastes.entity.MenuEntity;

import java.util.List;

/**
 * @author created by fuguoyong
 * 版本：1.0
 * 创建日期：2020-11-19 13
 * 描述：FirstMenuAdapter
 */
public class FirstMenuAdapter extends BaseQuickAdapter<MenuEntity, BaseViewHolder> {

    public FirstMenuAdapter(int layoutResId, @Nullable List<MenuEntity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MenuEntity item) {

        helper.setText(R.id.tv_first_title, item.getMenuName());
        RecyclerView recyclerView = helper.getView(R.id.rv_list);
        recyclerView.setLayoutManager(new GridLayoutManager(mContext,4));
        recyclerView.setAdapter(new SecondMenuAdapter(R.layout.item_second_menu,item.getMenuBeans()));

    }
    public void get(){
        return;
    }
}